From 3418504b4b103850b6a83d33319aaecc3c5d0d83 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 10 Jun 2021 08:37:13 -0400 Subject: [PATCH] checkbutton: Fix actionable state tracking If we have a GAction as model, we just have to call gtk_action_helper_activate() and let the action helper handle the state updates, Fixes: #4022 --- gtk/gtkcheckbutton.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c index 0ed5bf8dd3..b5c2eecab2 100644 --- a/gtk/gtkcheckbutton.c +++ b/gtk/gtkcheckbutton.c @@ -325,10 +325,10 @@ click_released_cb (GtkGestureClick *gesture, gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED); - gtk_check_button_set_active (self, !priv->active); - if (priv->action_helper) gtk_action_helper_activate (priv->action_helper); + else + gtk_check_button_set_active (self, !priv->active); } static void -- 2.30.2